package com.ycj.design.create.factory.factorymethod;

import java.util.concurrent.Executors;

/**
 * @author chuanjieyang
 * @date Nov 20, 2018 16:38:15 PM
 */
public class Test {

    @org.junit.Test
    public void test(){
        //声明阴阳八卦炉
        AbstractHumanFactory YinYangLu = new HumanFactory();
        //女娲第一次造人，
        System.out.println("------第一次造人------");
        WhiteHuman whiteHuman = YinYangLu.createHuman(WhiteHuman.class);
        whiteHuman.getColor();
        whiteHuman.talk();
        System.out.println("------第二次造人------");
        YellowHuman yellowHuman = YinYangLu.createHuman(YellowHuman.class);
        yellowHuman.getColor();
        yellowHuman.talk();
    }

}
